﻿using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace B13_Ex1_2
{
    public static class BegginersRhombus
    {
        public static void Main()
        {
            int m_NumberOfStarRows = 5;
            RhombusPrinter(m_NumberOfStarRows);
        }

        public static void RhombusPrinter(int numOfRows)
        {
            int numOfStars = 1;
            int numOfSpaces = numOfRows / 2;
            StringBuilder MyRhombus = new StringBuilder();
            for (int i = 0; i <= (numOfRows / 2); i++)
            {
                for (int j = 0; j < numOfSpaces; j++)
                {
                    MyRhombus.Append(' ');
                }

                for (int k = 0; k < numOfStars; k++)
                {
                    MyRhombus.Append('*');
                }

                MyRhombus.Append('\n');
                numOfSpaces--;
                numOfStars += 2;
            }

            numOfSpaces = 1;
            numOfStars = numOfRows - 2;
            for (int i = 0; i <= (numOfRows / 2); i++)
            {
                for (int j = 0; j < numOfSpaces; j++)
                {
                    MyRhombus.Append(' ');
                }

                for (int k = 0; k < numOfStars; k++)
                {
                    MyRhombus.Append('*');
                }

                MyRhombus.Append('\n');
                numOfSpaces++;
                numOfStars -= 2;
            }

            System.Console.WriteLine(MyRhombus);
            System.Console.ReadLine();
        }
    }
}
